﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ZOVNP.Model.Abstracts;

namespace ZOVNP.Engine
{
    [DomainObject(typeof(IMaterial))]
    public partial class Material : IMaterial
    {
        private IDomainCollection<IPriceItem> _priceItemsLocker;

        public Material()
        {
            _priceItemsLocker = new SmartCollection<PriceItem, IPriceItem>(this, PriceItems);
        }

        IDomainCollection<IPriceItem> IMaterial.PriceItems
        {
            get { return _priceItemsLocker; }
        }

        public override string ToString()
        {
            return Name;
        }
    }
}
